import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

import Main from '../components/Main'
import FillIn from '../components/FillIn'
import Father from '../components/Father'

const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

const router = new VueRouter({
    mode:'hash',
    routes: [
        {
			path: '/main',
			name:'Main',
			component: Main,
        },
		{
			path: '/fillIn',
			name:'fillIn',
			component: FillIn,
        },
		{
			path: '/father',
			component: Father,
        },
		{
			// eslint-disable-next-line no-mixed-spaces-and-tabs
		    path:'/',
			// eslint-disable-next-line no-mixed-spaces-and-tabs
		    component: Father,
		},
]
})

export default router